<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title></title>

    <link rel="stylesheet" href="css/amazeui.min.css">
    <link rel="stylesheet" href="css/admin.css">
    <link rel="stylesheet" href="css/app.css">
</head>

<body>

<div class="am-cf admin-main" style="padding-top: 0px;">
    <!-- content start -->
    <div class="admin-content">
        <div class="admin-content-body">

            <div class="container">
                <div class="am-g">
                    <div class="am-u-sm-12 am-u-md-6">
                        <div class="am-btn-toolbar">
                            <div class="am-btn-group am-btn-group-xs">
                                <button type="button" class="am-btn am-btn-default btnAdd">
                                    <span class="icon-plus"></span> 新增
                                </button>

                                <button type="button" class="am-btn am-btn-default" id="btnremove" onclick="delAll()">
                                    <span class="icon-trash"></span> 删除
                                </button>
                            </div>
                        </div>
                    </div>
                    <div class="am-u-sm-12 am-u-md-3">

                        <select id="selDepart" data-am-selected="{btnSize: 'sm'}" style="display: none;">
                            <option value="0">
                                请选择部门
                            </option>

                            <option value="14">
                                研发部
                            </option>

                            <option value="22">
                                市场部
                            </option>

                        </select>
<!--                        <div class="am-selected am-dropdown " id="am-selected-dhh2q" data-am-dropdown="">-->
<!--                            <button type="button"-->
<!--                                    class="am-selected-btn am-btn am-dropdown-toggle am-btn-sm am-btn-default"><span-->
<!--                                    class="am-selected-status am-fl">请选择部门</span> <i-->
<!--                                    class="am-selected-icon am-icon-caret-down"></i></button>-->
<!--                            <div class="am-selected-content am-dropdown-content">-->
<!--                                <h2 class="am-selected-header"><span class="am-icon-chevron-left">返回</span></h2>-->
<!--                                &lt;!&ndash;										<ul class="am-selected-list">&ndash;&gt;-->
<!--                                &lt;!&ndash;											<li class="am-checked" data-index="0" data-group="0" data-value="0"> <span class="am-selected-text">请选择部门</span> <i class="am-icon-check"></i></li>&ndash;&gt;-->
<!--                                &lt;!&ndash;											<li class="" data-index="1" data-group="0" data-value="14"> <span class="am-selected-text">研发部</span> <i class="am-icon-check"></i></li>&ndash;&gt;-->

<!--                                &lt;!&ndash;										</ul>&ndash;&gt;-->
<!--                                <div class="am-selected-hint"></div>-->
<!--                            </div>-->
<!--                        </div>-->
                        <div class="am-selected am-dropdown " id="am-selected-z6ofo" data-am-dropdown="">
                            <!--									<button style="display: none;" type="button" class="am-selected-btn am-btn am-dropdown-toggle am-btn-sm am-btn-default">-->
                            <!--										<span class="am-selected-status am-fl">请选择部门</span>-->
                            <!--										<i class="am-selected-icon am-icon-caret-down"></i>-->
                            <!--									</button>-->
                            <div class="am-selected-content am-dropdown-content">
                                <h2 class="am-selected-header">
                                    <span class="am-icon-chevron-left">返回</span>
                                </h2>
                                <!--										<ul class="am-selected-list">-->
                                <!--											<li class="am-checked" data-index="0" data-group="0" data-value="option1">-->
                                <!--												<span class="am-selected-text">请选择部门</span>-->
                                <!--												<i class="am-icon-check"></i>-->
                                <!--											</li>-->

                                <!--											<li class="" data-index="1" data-group="0" data-value="option2">-->
                                <!--												<span class="am-selected-text">研发部</span>-->
                                <!--												<i class="am-icon-check"></i>-->
                                <!--											</li>-->

                                <!--											<li class="" data-index="1" data-group="0" data-value="option2">-->
                                <!--												<span class="am-selected-text">市场部</span>-->
                                <!--												<i class="am-icon-check"></i>-->
                                <!--											</li>-->

                                <!--											<li class="" data-index="1" data-group="0" data-value="option2">-->
                                <!--												<span class="am-selected-text">渠道一部</span>-->
                                <!--												<i class="am-icon-check"></i>-->
                                <!--											</li>-->

                                <!--											<li class="" data-index="1" data-group="0" data-value="option2">-->
                                <!--												<span class="am-selected-text">教学部</span>-->
                                <!--												<i class="am-icon-check"></i>-->
                                <!--											</li>-->

                                <!--											<li class="" data-index="1" data-group="0" data-value="option2">-->
                                <!--												<span class="am-selected-text">教务部</span>-->
                                <!--												<i class="am-icon-check"></i>-->
                                <!--											</li>-->

                                <!--											<li class="" data-index="1" data-group="0" data-value="option2">-->
                                <!--												<span class="am-selected-text">渠道二部</span>-->
                                <!--												<i class="am-icon-check"></i>-->
                                <!--											</li>-->

                                <!--											<li class="" data-index="1" data-group="0" data-value="option2">-->
                                <!--												<span class="am-selected-text">渠道三部</span>-->
                                <!--												<i class="am-icon-check"></i>-->
                                <!--											</li>-->

                                <!--										</ul>-->
                                <div class="am-selected-hint"></div>
                            </div>
                        </div>
                    </div>

                    <div class="am-u-sm-12 am-u-md-3">
                        <div class="am-input-group am-input-group-sm">
                            <input class="am-form-field" placeholder="请输入员工姓名" id="username" type="text">
                            <span class="am-input-group-btn">
										<button class="am-btn am-btn-default" type="button" id="btnsearch">
											搜索
										</button> </span>
                        </div>
                    </div>
                </div>
                <div class="am-g" style="margin-top: -30px;">
                    <div class="am-u-sm-12">
                        <form class="am-form" action="user/delAll.action">
                            <table class="am-table am-table-striped am-table-hover table-main">
                                <thead>
                                <tr>
                                    <th class="table-check">
                                        <input id="chkAll" type="checkbox">
                                    </th>
                                    <th class="table-id">
                                        ID
                                    </th>
                                    <th>
                                        用户名
                                    </th>
                                    <th class="table-title">
                                        姓名
                                    </th>
                                    <th>
                                        性别
                                    </th>
                                    <th>
                                        电话
                                    </th>
                                    <th>
                                        邮箱
                                    </th>
                                    <th class="table-set">
                                    </th>
                                </tr>
                                </thead>
<!--                                <tbody id="tUser">-->
<!--                                <tr>-->
<!--                                    <td><input name="ids" value="1" type="checkbox"></td>-->
<!--                                    <td>1</td>-->
<!--                                    <td>admin</td>-->
<!--                                    <td>-->
<!--                                        <a href="#">张三</a>-->
<!--                                    </td>-->
<!--                                    <td><span class="am-badge am-badge-secondary">男</span></td>-->
<!--                                    <td>开发部</td>-->
<!--                                    <td>2332@qq.com</td>-->
<!--                                    <td>-->
<!--                                        <div class="am-btn-toolbar">-->
<!--                                            <div class="am-btn-group am-btn-group-xs">-->
<!--                                                <button type="button"-->
<!--                                                        class="am-btn am-btn-default am-btn-xs am-text-secondary btnEdit">-->
<!--                                                    <span class="am-icon-pencil-square-o"></span> 编辑-->
<!--                                                </button>-->
<!--                                                <button type="button"-->
<!--                                                        class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"-->
<!--                                                        onclick="delUser(1,1)"><span class="am-icon-trash-o"></span> 删除-->
<!--                                                </button>-->
<!--                                            </div>-->
<!--                                        </div>-->
<!--                                    </td>-->
<!--                                </tr>-->
<!--                                <tr>-->
<!--                                    <td><input name="ids" value="1" type="checkbox"></td>-->
<!--                                    <td>1</td>-->
<!--                                    <td>王五</td>-->
<!--                                    <td>-->
<!--                                        <a href="#">admin</a>-->
<!--                                    </td>-->
<!--                                    <td><span class="am-badge am-badge-secondary">男</span></td>-->
<!--                                    <td>开发部</td>-->
<!--                                    <td>2332@qq.com</td>-->
<!--                                    <td>-->
<!--                                        <div class="am-btn-toolbar">-->
<!--                                            <div class="am-btn-group am-btn-group-xs">-->
<!--                                                <button type="button"-->
<!--                                                        class="am-btn am-btn-default am-btn-xs am-text-secondary btnEdit">-->
<!--                                                    <span class="am-icon-pencil-square-o"></span> 编辑-->
<!--                                                </button>-->
<!--                                                <button type="button"-->
<!--                                                        class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"-->
<!--                                                        onclick="delUser(1,1)"><span class="am-icon-trash-o"></span> 删除-->
<!--                                                </button>-->
<!--                                            </div>-->
<!--                                        </div>-->
<!--                                    </td>-->
<!--                                </tr>-->

<!--                                <tr>-->
<!--                                    <td><input name="ids" value="1" type="checkbox"></td>-->
<!--                                    <td>1</td>-->
<!--                                    <td>admin</td>-->
<!--                                    <td>-->
<!--                                        <a href="#">admin</a>-->
<!--                                    </td>-->
<!--                                    <td><span class="am-badge am-badge-secondary">男</span></td>-->
<!--                                    <td>开发部</td>-->
<!--                                    <td>2332@qq.com</td>-->
<!--                                    <td>-->
<!--                                        <div class="am-btn-toolbar">-->
<!--                                            <div class="am-btn-group am-btn-group-xs">-->
<!--                                                <button type="button"-->
<!--                                                        class="am-btn am-btn-default am-btn-xs am-text-secondary btnEdit">-->
<!--                                                    <span class="am-icon-pencil-square-o"></span> 编辑-->
<!--                                                </button>-->
<!--                                                <button type="button"-->
<!--                                                        class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"-->
<!--                                                        onclick="delUser(1,1)"><span class="am-icon-trash-o"></span> 删除-->
<!--                                                </button>-->
<!--                                            </div>-->
<!--                                        </div>-->
<!--                                    </td>-->
<!--                                </tr>-->
<!--                                <tr>-->
<!--                                    <td><input name="ids" value="1" type="checkbox"></td>-->
<!--                                    <td>1</td>-->
<!--                                    <td>admin</td>-->
<!--                                    <td>-->
<!--                                        <a href="#">admin</a>-->
<!--                                    </td>-->
<!--                                    <td><span class="am-badge am-badge-secondary">男</span></td>-->
<!--                                    <td>产品部</td>-->
<!--                                    <td>2332@qq.com</td>-->
<!--                                    <td>-->
<!--                                        <div class="am-btn-toolbar">-->
<!--                                            <div class="am-btn-group am-btn-group-xs">-->
<!--                                                <button type="button"-->
<!--                                                        class="am-btn am-btn-default am-btn-xs am-text-secondary btnEdit">-->
<!--                                                    <span class="am-icon-pencil-square-o"></span> 编辑-->
<!--                                                </button>-->
<!--                                                <button type="button"-->
<!--                                                        class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"-->
<!--                                                        onclick="delUser(1,1)"><span class="am-icon-trash-o"></span> 删除-->
<!--                                                </button>-->
<!--                                            </div>-->
<!--                                        </div>-->
<!--                                    </td>-->
<!--                                </tr>-->

<!--                                <tr>-->
<!--                                    <td><input name="ids" value="1" type="checkbox"></td>-->
<!--                                    <td>1</td>-->
<!--                                    <td>admin</td>-->
<!--                                    <td>-->
<!--                                        <a href="#">admin</a>-->
<!--                                    </td>-->
<!--                                    <td><span class="am-badge am-badge-secondary">男</span></td>-->
<!--                                    <td>开发部</td>-->
<!--                                    <td>2332@qq.com</td>-->
<!--                                    <td>-->
<!--                                        <div class="am-btn-toolbar">-->
<!--                                            <div class="am-btn-group am-btn-group-xs">-->
<!--                                                <button type="button"-->
<!--                                                        class="am-btn am-btn-default am-btn-xs am-text-secondary btnEdit">-->
<!--                                                    <span class="am-icon-pencil-square-o"></span> 编辑-->
<!--                                                </button>-->
<!--                                                <button type="button"-->
<!--                                                        class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"-->
<!--                                                        onclick="delUser(1,1)"><span class="am-icon-trash-o"></span> 删除-->
<!--                                                </button>-->
<!--                                            </div>-->
<!--                                        </div>-->
<!--                                    </td>-->
<!--                                </tr>-->

<!--                                <tr>-->
<!--                                    <td><input name="ids" value="1" type="checkbox"></td>-->
<!--                                    <td>1</td>-->
<!--                                    <td>admin</td>-->
<!--                                    <td>-->
<!--                                        <a href="#">admin</a>-->
<!--                                    </td>-->
<!--                                    <td><span class="am-badge am-badge-secondary">男</span></td>-->
<!--                                    <td>测试部</td>-->
<!--                                    <td>2332@qq.com</td>-->
<!--                                    <td>-->
<!--                                        <div class="am-btn-toolbar">-->
<!--                                            <div class="am-btn-group am-btn-group-xs">-->
<!--                                                <button type="button"-->
<!--                                                        class="am-btn am-btn-default am-btn-xs am-text-secondary btnEdit">-->
<!--                                                    <span class="am-icon-pencil-square-o"></span> 编辑-->
<!--                                                </button>-->
<!--                                                <button type="button"-->
<!--                                                        class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"-->
<!--                                                        onclick="delUser(1,1)"><span class="am-icon-trash-o"></span> 删除-->
<!--                                                </button>-->
<!--                                            </div>-->
<!--                                        </div>-->
<!--                                    </td>-->
<!--                                </tr>-->

<!--                                </tbody>-->
                            </table>
                        </form>
                    </div>
                </div>
            </div>

        </div>
        <!-- content end -->
    </div>
</div>

<!--[if lt IE 9]>
<script src="http://libs.baidu.com/jquery/1.11.3/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="assets/js/amazeui.ie8polyfill.min.js"></script>
<![endif]-->

<!--[if (gte IE 9)|!(IE)]><!-->
<script src="dist/js/jquery.min.js"></script>
<!--<![endif]-->
<script type="text/javascript" src="myplugs/js/plugs.js"></script>
<script>
    $(document).ready(function (){
        $.ajax({
            url: "http://192.168.96.109:8060/user/get_by_username",
            type: "GET",
            dataType: "json",
            success: function (res){
                console.log(res)
                if(res.state == 200){
                    //	数据请求成功回显数据在html页面
                    $("#username").val(res.data.username)
                    $("#phone").val(res.data.phone)
                    $("#email").val(res.data.email)
                    //0：单选框女选中
                    //1：单选框男选中
                    res.data.sex == 0 ? $("#gender-female").prop("checked", "checked") : $("#gender-male").prop("checked", "checked");
                }
            }
        })
    })
</script>
<script>
    $(function () {
        $(".btnAdd").click(function () {
            $.jq_Panel({
                title: "添加用户",
                url: "addUser.html",
                iframeWidth: 800,
                iframeHeight: 600,
            });
        });

        $(".btnEdit").click(function () {
            $.jq_Panel({
                title: "编辑用户",
                url: "addUser.html",
                iframeWidth: 800,
                iframeHeight: 600,
            });

        });

    });
</script>
</body>

</html>
